function close_process_model() {
    document.getElementById('process_select').style.display = "none";
}

let process_box = document.querySelector("#process-box");
let process_model = document.querySelector("#process-model");
process_box.addEventListener("mousedown", function (e) {
    let x = e.pageX - process_model.offsetLeft;
    let y = e.pageY - process_model.offsetTop;

    document.addEventListener("mousemove", move);
    function move(e) {
        process_model.style.left = e.pageX - x + 'px';
        process_model.style.top = e.pageY - y + 'px';
    }

    document.addEventListener("mouseup", function (e) {
        document.removeEventListener("mousemove", move);
    })
});

// 左侧选择节点类型
function choose_process(this_tag, right_type) {
    var left_navigation_list = document.getElementsByName("left_navigation");
    for (var i=0; i<left_navigation_list.length; i++) {
        left_navigation_list[i].className = 'left_navigation';
    }
    this_tag.className = "left_navigation left_navigation_active";
    if (right_type === 1) {
        document.getElementById('right_type_one').style.display = "inline-block";
        document.getElementById('right_type_two').style.display = "none";
        document.getElementById('right_type_three').style.display = "none";
        document.getElementById('right_type_four').style.display = "none";
    }else if (right_type === 2) {
        document.getElementById('right_type_two').style.display = "inline-block";
        document.getElementById('right_type_one').style.display = "none";
        document.getElementById('right_type_three').style.display = "none";
        document.getElementById('right_type_four').style.display = "none";
    }else if (right_type === 3) {
        document.getElementById('right_type_three').style.display = "inline-block";
        document.getElementById('right_type_one').style.display = "none";
        document.getElementById('right_type_two').style.display = "none";
        document.getElementById('right_type_four').style.display = "none";
    }else {
        document.getElementById('right_type_four').style.display = "inline-block";
        document.getElementById('right_type_one').style.display = "none";
        document.getElementById('right_type_two').style.display = "none";
        document.getElementById('right_type_three').style.display = "none";
    }
}